<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<button id="btn1">tradition</button>
<button id="btn2">standard</button>
<script>
  var btn1 = document.querySelector('#btn1');
  var btn2 = document.querySelector('#btn2');

  btn1.onclick = function () {
    alert('hi');
  };
  btn1.onclick = function () {
    alert('how are u')
  };
  // => alert('how are u')
  btn2.addEventListener('click', function () {
    alert('hi');
  })
  btn2.addEventListener('click', function () {
    alert('how are u');
  })
  // => alert('hi') alert('how are u')
</script>
</body>
</html>